import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 列表 /apiapp/v1/warehouse_order_order/list
export function warehouse_orderListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_order/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/warehouse_order/details
export function warehouse_orderDetailApi (id, params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_order/details?id=${id}`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/warehouse_order/create
export function warehouse_orderCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_order/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/warehouse_order/edit
export function warehouse_orderEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_order/edit?id=${data.id}`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/warehouse_order/delete
export function warehouse_orderDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_order/delete`,
    method: 'post',
    data
  });
}
